<html>
<head></head>
<body>
<h1>Act Gallery Demo</h1>
<ul class="menu">
  <li>
    <a href="/photo/add">Add Photo</a>
  </li>
</ul>
<ul id="gallery">
</ul>
<script src="/asset/js/jquery-1.11.3.min.js"></script>
<script src="/asset/js/app-util.js"></script>
<script>
  $.getJSON("/api/v1/photo", function(data) {
    var $dock = $('#gallery');
    var tmpl = '<li><a href="#"><img src="{0}"></a><div class="title">{1}</div><div class="desc">{2}</div></li>';
    $.each(data, function(id, photo) {
      $dock.append(tmpl.fmt(photo.thumbnailUrl, photo.title, photo.description));
    })
  })
</script>
</body>
</html>